package com.ithengxing.d2_static_method;

public class Student {
    private String name ;
    private  int age;

    //实例方法无static修饰

    public void study() {
        System.out.println(name + "在");
    }
    //被static修饰后属于类方法
    public static void getMax(int a, int b) {
        System.out.println(a > b?a:b);
    }

    public static void main(String[] args) {
        Student.getMax(1, 2);

        Student st  = new Student();
        st.name = "maker";
        System.out.println(st.name);
    }
}
